[mirrors]
ftp://sunsite.ualberta.ca/pub/Mirror/lsof/lsof_4.87.tar.bz2

[main]
filesize=773664
sha512=5e811225dd65366e3ef49628d567864fadda1dbda2d66a5e473123e73c468f5a3a577ae4e1b701a55ac49c2a759dab5c413663121c260a2804fca10ece902766

[deps]

[build]
tar xf lsof_4.87_src.tar && cd lsof_4.87_src

patch -p1 < "$K"/lsof-rpc-configure.patch
patch -p1 < "$K"/lsof-Makefile.patch
patch -p1 < "$K"/lsof-dsock.patch

./Configure -n linux

make -j$MAKE_THREADS CC="$CC" CDEF="$optcflags" \
  LDFLAGS="$optldflags -static"

dest="$butch_install_dir""$butch_prefix"
install -D -m 755 lsof "$dest"/bin/lsof && \
install -D -m 644 lsof.8 "$dest"/share/man/man8
